<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE HTML>
<html>
	<head>
		<%@ include file="/WEB-INF/jsp/inc/taglibs.jsp"%>
		<%@ include file="/WEB-INF/jsp/inc/meta.jsp"%>
	</head>
	<script>
		function findByAddress(address){
			document.getElementById("address").value = address ;
			document.applyForm.submit() ;
		}
	</script>
	<body style="background: #E8F5FE; padding: 15px 18px;" class="scroll_r">
				
		<div id="right_w">
			<p>
				当前位置：报建管理 >> 区域信息
			</p>
		</div>
			<form action="${approot}/admin/apply/apply_address_group">
			<table border="0" cellpadding="0" cellspacing="1" width="92%" align="center" id="add_tab">	
			<tr><td colspan="10" style="text-align: left">
				地址：<input name="address" value="${address}"/>
				<input type="submit" value="查询"/>
			</td></tr>
			</table>
			</form>
			<c:choose>
				<c:when test="${fn:length(applyAddressGroups)<1}">
				<div align="center"><font color='red'>对不起,暂时没有找到符合条件的数据!</font></div>
				</c:when>
				<c:otherwise> 
				<table border="0" cellpadding="" cellspacing="1" align="center"
					width="92%" id="web_tab">
					<tr>
						<th width="10%">
							编号
						</th>
						<th>
							地址
						</th>
						<th width="20%">
							户数
						</th>
					</tr>
				<c:forEach var="addressGroup" items="${applyAddressGroups}" varStatus="index">
					<tr>
						<td>${index.index + 1}</td>
						<c:forEach var="value" items="${addressGroup}" varStatus="index">
							<td>
								<c:if test="${index.index == 0}">
									<a href="javascript:void(0)" onclick="findByAddress('${value}')">${value}</a>
								</c:if>
								<c:if test="${index.index != 0}">
									${value}
								</c:if>
							</td>
						</c:forEach>
					</tr>
				</c:forEach>
					
					
				</table>

				</c:otherwise>
				
</c:choose>
	<form name="applyForm" action="${approot}/admin/apply/apply_list/form/0" method="post">
		<input type="hidden" name="address" id="address"/>
	</form>
	</body>
</html>
